-- GENERATED SPELL FOR [Adyen the Lightwarden] --


function spell0_18537(pUnit, Event) --@Crusader Strike,n/a--
pUnit:FullCastSpellOnTarget(14518,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18537', 30327, 1)
end

function spell1_18537(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(13874,pUnit)
pUnit:RegisterEvent('Sorts_18537', 8259, 1)
end

function spell2_18537(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18537', 6257, 1)
end

function spell3_18537(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(13952,pUnit)
pUnit:RegisterEvent('Sorts_18537', 2500, 1)
end

function Sorts_18537(pUnit, Event)
local choix_sorts_18537 = math.random(0, 3)
if choix_sorts_18537 == 0 then
pUnit:RegisterEvent('spell0_18537', 1, 1)
end
if choix_sorts_18537 == 1 then
pUnit:RegisterEvent('spell1_18537', 1, 1)
end
if choix_sorts_18537 == 2 then
pUnit:RegisterEvent('spell2_18537', 1, 1)
end
if choix_sorts_18537 == 3 then
pUnit:RegisterEvent('spell3_18537', 1, 1)
end
end

function mob18537_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18537', math.random(1500, 3000), 1)
end

function mob18537_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18537_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18537_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18537, 1, 'mob18537_Action')
RegisterUnitEvent(18537, 2, 'mob18537_Leave')
RegisterUnitEvent(18537, 3, 'mob18537_Kill')
RegisterUnitEvent(18537, 4, 'mob18537_Die')
